<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<c:set var="chapterMoi"><fmt:formatNumber type="number" maxIntegerDigits="4" value="${chapterTruyen.chapterNumber}" pattern="###.###" /></c:set>
<section id="controlChapter">
	
	
	<div class="control">
		<a class="firstChapter" href="" title="Chapter đầu tiên">Đầu</a>
		<a class="prevChapter" href="" title="Chapter trước">Trước</a>
		<form>
			<select id ="lstChapter" name="slChapter">
				<c:forEach items="${lstChapterTruyen}" var="item">
					<c:set var="chapterNumberOfLst"><fmt:formatNumber type="number" maxIntegerDigits="4" value="${item.chapterNumber}" pattern="###.###" /></c:set>
					<option <c:if test="${chapterMoi == chapterNumberOfLst}">selected="selected"</c:if> value="<spring:url value="/truyen-tranh/${fn:replace(truyen.alias,' ','-')}-chapter-${chapterNumberOfLst}-T${truyen.id}-C${item.id}.htm" />">${chapterNumberOfLst}</option>
				</c:forEach>
			</select>
		</form>
		<a class="nextChapter" href="" title="Chapter tiếp theo">Sau</a>
		<a class="lastChapter" href="" title="Chapter cao nhất">Cuối</a>
	</div>
	<jsp:include page="../shareBar.jsp" />
	<jsp:include page="/WEB-INF/includes/aBookmark.jsp" />
	<h4 class="textOverflow">
		Xem theo dạng:
		<select id="chonKieuDoc" style="display:inline;color:#ff8800">
			<option id="nhieuTrang" value="2">Nhiều ảnh</option>
			<option id="motTrang" value="1">Một ảnh</option>
		</select>
	</h4>
</section>